﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace Zatify.WebUI.Admin.Models
{
    public class UpdateCategoryViewModel
    {
        public int CategoryId { get; set; }

        [Required(ErrorMessage = "Category Name is rquired")]
        public string CategoryName { get; set; }

        [StringLength(200, ErrorMessage = "Category Description cannot be longer than 200 characters.")]
        [DisplayFormat(ConvertEmptyStringToNull = false)]
        public string CategoryDescription { get; set; }

        [RegularExpression("^(0|[1-9][0-9]*)$", ErrorMessage = "Sort Order must be numeric value")]
        public int SortOrder { get; set; }

        public int? ParentId { get; set; }

        public bool IsSingularSelection { get; set; }

        public bool IsRoot { get; set; }
        public bool NotMergeable { get; set; }
    }
}